function createTable(ID,user)
{
	var lastsel2=0;
	var lastsel=0;
	console.log("#table_"+ID+'_'+user);
	jQuery("#table_"+ID+'_'+user).jqGrid({
	   	url:'/admin/show/'+ID+'/'+user,
	    
		datatype: "json",
	    mtype: 'POST',
	   	colNames:['ID',name,desc,'>'],
	   	colModel:[
	   		{name:'id',index:'id', width:55, align:"center",key:true,hidden:true},
	   		{name:'name',index:'name', width:250,editable:false,editrules:{required:true}},
	   		{name:'desc',index:'desc', width:800,editable:false,edittype:'textarea',editrules:{required:true}},
	   		{name:'go',index:'go', width:40, align:"center",editable:false}
	   	],
	   //	rowNum:20,
	   //	rowList:[10,20,30],
	   	pager: '#pager_'+ID+'_'+user,
	   	sortname: 'id',
	    viewrecords: true,
	    sortorder: "asc",
	    caption:ID,
	    subGrid: false,
	   
	    width:"1200",
	    height:"400"
	   });
	jQuery("#table_"+ID+'_'+user).jqGrid('navGrid','#pager_'+ID+'_'+user,{edit:false,add:false,del:false});
}
$(function(){
$('.button').each(function(){
			if($(this).attr('link')==window.location.pathname.substr(7))
			{
				$(this).removeClass('button').addClass('buttona');
			}
		}).click(function(){
			window.location ='/admin/'+$(this).attr('link');
		});
});